package com.atguigu.gmall.realtime.dws.app;

import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import com.atguigu.edu.realtime.common.base.BaseApp;
import com.atguigu.edu.realtime.common.constant.Constant;
import com.fasterxml.jackson.databind.PropertyNamingStrategies;
import org.apache.commons.lang3.StringUtils;
import org.apache.flink.api.common.functions.MapFunction;
import org.apache.flink.streaming.api.datastream.DataStreamSource;
import org.apache.flink.streaming.api.datastream.SingleOutputStreamOperator;
import org.apache.flink.streaming.api.environment.StreamExecutionEnvironment;

public class DwsTradeOrderWindow extends BaseApp {
    public static void main(String[] args) {
        new DwsTradeOrderWindow().start(
                12424,
                4,
                "dws_trade_order_window",
                Constant.DWD_TRANS_ORDER
        );
    }
    @Override
    public void handle(StreamExecutionEnvironment env, DataStreamSource<String> kafkaStrDS) {
        kafkaStrDS.print();
        //3> {"id":"51941","user_id":"34","province_id":null,"course_id":"378","course_name":"ES6教程-涵盖ES6-ES11",
        // "order_status":null,"origin_amount":"200.0","coupon_reduce":"0.0","final_amount":"200.0","ts":1731587744}
        //3> {"id":"51941","user_id":"34","province_id":"31","course_id":"378","course_name":"ES6教程-涵盖ES6-ES11",
        // "order_status":"1001","origin_amount":"200.0","coupon_reduce":"0.0","final_amount":"200.0","ts":1731587744}




    }
}
